<include file="Public:header" />
<load href="__JS__/upload/uploadify.css" />
<load href="__JS__/swfobject.js" />
<script type="text/javascript" src="__JS__/jquery.uploadify.v2.1.4.min.js"></script> 
<div class="content">
<!-----------------------------------------内容开始--------------------------------------------------->
<div class="infoBox">
<form name="form" action="{:U('domenu')}" method="post" onsubmit="return checkform();">
<input type="hidden" name="id" value="{$id}" />


<table width="100%" border="0" cellpadding="0" cellspacing="0" id="basic">
<tr>
<td width="11%" class="infoBoxTd">分类项目：</td>
<td colspan="2"><input type="text" name="name" value="{$name}" />
</td>
</tr>

<volist name="lang" id="l1">
<tr>
<td width="11%" class="infoBoxTd">分类项目（{$l1.name}）：</td>
<td colspan="2"><input type="text" name="name{$l1.id}" value="<?php echo $name.$l1['id'] ?>" />
</td>
</tr>
</volist>

<tr>
<td width="11%" class="infoBoxTd">所属分类：</td>
<td colspan="2">
<select name="mid">
<option value="0">顶级分类</option>
<volist name="topmenu" id="topmenu">
<option value="{$topmenu.id}" <eq name="topmenu.id" value="$mid">selected</eq>>{$topmenu.name}</option>
</volist>
</select>
</td>
</tr>

<tr>
<td width="11%" class="infoBoxTd">代号：</td>
<td colspan="2"><input type="text" name="nid" value="{$nid}"  />
</td>
</tr>


<tr>
<td width="11%" class="infoBoxTd">游标左代号：</td>
<td colspan="2"><input type="text" name="nid_l" value="{$nid_l}"  />
</td>
</tr>


<tr>
<td width="11%" class="infoBoxTd">游标右代号：</td>
<td colspan="2"><input type="text" name="nid_r" value="{$nid_r}"  />
</td>
</tr>

<tr>
<td width="11%" class="infoBoxTd">排序：</td>
<td colspan="2"><input type="text" name="xu" value="{$xu}" />
</td>
</tr>

</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="infoBoxTd">&nbsp;</td>
<td align="left"><input type="submit" name="Button1" value="保存" class="formInput01" /></td>
</tr>
</table>
</form>
</div>
<!-----------------------------------------内容结束--------------------------------------------------->
</div>
<script language="javascript">

//表单验证
function checkform(){
	var b = $('input[name="name"]').val();
	if(b == ''){
		ui.error('请输入区域');
		return false;
	}
	var n = $('input[name="nid"]').val();
	if(n == ''){
		ui.error('请输入代号');
		return false;
	}
	if(/^[A-Za-z0-9_-]+$/.test(n)==0) {
		ui.error('代号只能输入英文字母和数字');
		return false;
	}
	var nl = $('input[name="nid_l"]').val();
	if(nl == ''){
		ui.error('请输入游标左代号');
		return false;
	}
	if(/^[A-Za-z0-9_-]+$/.test(nl)==0) {
		ui.error('游标左代号只能输入英文字母和数字');
		return false;
	}
	var nr = $('input[name="nid_r"]').val();
	if(nr == ''){
		ui.error('请输入游标右代号');
		return false;
	}
	if(/^[A-Za-z0-9_-]+$/.test(nr)==0) {
		ui.error('游标右代号只能输入英文字母和数字');
		return false;
	}

}

</script>
    

<include file="Public:footer" />
